﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Patients.Master" AutoEventWireup="true" CodeBehind="PatientAccountAanmaak.aspx.cs" Inherits="DokterAfspraken.PatientPages.PatientAccountAanmaak" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderContent" runat="server">

<script type="text/javascript">

    function CheckInput() {
        var foutenstring = "Niet in orde: \n";
        var acountNaam = document.getElementById("ContentPlaceHolderContent_txtAcountnaam").value;
        var voorNaam = document.getElementById("ContentPlaceHolderContent_txtVoornaam").value;
        var achterNaam = document.getElementById("ContentPlaceHolderContent_txtAchternaam").value;
        var gemeente = document.getElementById("ContentPlaceHolderContent_txtGemeente").value;
        var postCode = document.getElementById("ContentPlaceHolderContent_txtPostcode").value;
        var huisNummer = document.getElementById("ContentPlaceHolderContent_txtHuisnummer").value;
        var straat = document.getElementById("ContentPlaceHolderContent_txtStraat").value;
        var pasWoord = document.getElementById("ContentPlaceHolderContent_txtPaswoord").value;
        var pasWoordCheck = document.getElementById("ContentPlaceHolderContent_txtPaswoordCheck").value;
        var telefoon = document.getElementById("ContentPlaceHolderContent_txtTelefoon").value;
        var eMail = document.getElementById("ContentPlaceHolderContent_txtEmail").value;

        if (acountNaam == "") {
            foutenstring = foutenstring + "-accountnaam \n";
        }
        if (voorNaam == "") {
            foutenstring = foutenstring + "-voornaam \n";
        }
        if (achterNaam == "") {
            foutenstring = foutenstring + "-achternaam \n";
        }
        if (straat == "") {
            foutenstring = foutenstring + "-straat \n";
        }
        if (huisNummer == "") {
            foutenstring = foutenstring + "-huisnummer \n";
        }
        if (gemeente == "") {
            foutenstring = foutenstring + "-gemeente \n";
        }
        if (postCode == "") {
            foutenstring = foutenstring + "-postcode \n";
        }
        if (telefoon == "") {
            foutenstring = foutenstring + "-telefoon \n";
        }
        if (eMail == "") {
            foutenstring = foutenstring + "-email \n";
        }
        if (pasWoord != pasWoordCheck) {
            foutenstring = foutenstring + "-paswoorden komen niet overeen \n";
        }
        if (foutenstring != "Niet in orde: \n") {
            alert(foutenstring);
        }
    }


</script>

    <div class="loginBox">
        <div><h1>Registreer je:</h1></div>
        <div class="loginBox_links">
            <asp:Label ID="lblAcountnaam" runat="server" Text="Acountnaam:"></asp:Label>
            <br />
            <asp:Label ID="lblPaswoord" runat="server" Text="Paswoord:"></asp:Label>
            <br />
            <asp:Label ID="lblPaswoordCheck" runat="server" Text="Herhaal paswoord:"></asp:Label>
            <br />
            <asp:Label ID="lblVoornaam" runat="server" Text="Voornaam:"></asp:Label>
            <br />
            <asp:Label ID="lblAchternaam" runat="server" Text="Achternaam:"></asp:Label>
            <br />
            <asp:Label ID="lblStraat" runat="server" Text="Straat:"></asp:Label>
            <br />
            <asp:Label ID="lblHuisnummer" runat="server" Text="Huisnr.:"></asp:Label>
            <br />
            <asp:Label ID="lblPostcode" runat="server" Text="Postcode:"></asp:Label>
            <br />
            <asp:Label ID="lblGemeente" runat="server" Text="Gemeente:"></asp:Label>
            <br />
            <asp:Label ID="lblTelefoon" runat="server" Text="Tel.:"></asp:Label>
            <br />
            <asp:Label ID="lblEmail" runat="server" Text="E-mail:"></asp:Label>
            <br />
            <asp:Label ID="lblHuisdokter" runat="server" Text="Jouw huisdokter:"></asp:Label>
            <br />

            <asp:Button ID="btnOpslaan" runat="server" Text="Opslaan" onclick="btnOpslaan_Click" />
        </div>
        <div class="loginBox_rechts">
            <asp:TextBox ID="txtAcountnaam" runat="server" CssClass="txtField"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtPaswoord" runat="server" CssClass="txtField" 
                TextMode="Password"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtPaswoordCheck" runat="server" CssClass="txtField" 
                TextMode="Password"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtVoornaam" runat="server" CssClass="txtField"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtAchternaam" runat="server" CssClass="txtField"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtStraat" runat="server" CssClass="txtField"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtHuisnummer" runat="server" CssClass="txtField"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtPostcode" runat="server" CssClass="txtField"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtGemeente" runat="server" CssClass="txtField"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtTelefoon" runat="server" CssClass="txtField"></asp:TextBox>
            <br />
            <asp:TextBox ID="txtEmail" runat="server" CssClass="txtField"></asp:TextBox>
            <br />

            <asp:DropDownList ID="DropDownList1" runat="server" 
                DataSourceID="ObjectDataSource1" DataTextField="Achternaam" 
                DataValueField="ArtsID">
            </asp:DropDownList>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                SelectMethod="getAlleArtsen" TypeName="Model.DataModelManager">
            </asp:ObjectDataSource>

            <br />
        </div>
        
</div>
</asp:Content>
